﻿package org.leles.engines.octogame 
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Bruno leles
	 */
	public class OctoGameEvent extends Event 
	{
		public static const GAME_OVER:String			= "GAME_OVER";
		public static const GAME_START:String			= "GAME_START";
		public static const LEVEL_START:String			= "LEVEL_START";
		public static const LEVEL_OVER:String			= "LEVEL_OVER";
		public static const PHASE_ENTERED:String		= "PHASE_ENTERED";
		public static const PHASE_FINISHED:String		= "PHASE_FINISHED";
		public static const TENTACLE_RELEASED:String	= "TENTACLE_RELEASED";
		public static const TENTACLE_JOINTED:String		= "TENTACLE_JOINTED";
		public static const LETTER_PRESSED:String		= "LETTER_PRESSED";
		public static const LETTER_TIMESUP:String		= "LETTER_TIMESUP";
		public static const STATE_CHANGED:String		= "STATE_CHANGED";
		
		public var state:Number;
		
		public var reason:Number;
		
		public var level:OctoGameLevel;
		
		public var phase:OctoGamePhase;
		
		public var letter:String;
		public var rightLetter:Boolean;
		
		public var tentacle:OctoGameTentacle;
		
		public function OctoGameEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			
		} 
		
		public override function clone():Event 
		{ 
			return new OctoGameEvent(type, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("OctoGameEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}